package com.example.demo1.Demo2;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class EmployeeService {
    @Autowired
    private EmployeeDAO dao;

    public String add(Employee emp) {
        emp.setId(System.currentTimeMillis());
        if(dao.add(emp)==1){
            return "添加成功";
        }
        return "添加失败";
    }
}
